package cutetd.dao;

import java.util.List;

import cutetd.db.GaeDbBase;
import cutetd.model.M_Order;

public class OrderDao extends GaeDbBase{
	public M_Order getObjectByKey(String key) {
		return (M_Order)super.getObjectByKey(M_Order.class, key);
	}
	
	public void deleteByKey(String key) {
		super.delete(getObjectByKey(key));
	}
	
	@SuppressWarnings("unchecked")
	public List<M_Order> getListByOwner(String owner) {
		return (List<M_Order>) super.getListWhereOrderBy(M_Order.class, "sender=='" + owner +"'", "postDate asc");
	}
}
